#include "SystemIdPage.h"



void SystemIdPage::paint() {
    std::string content[4];

    const VersionInfo& versionInfo = ConfigManagerSingleton::instance().getVersionInfo();
    if (0 == mmultiPageNo) {

        resetStream();

        strStream << std::left << std::setw(14) << "systemInfo Id:" << std::right << std::setw(2) << pageNum;// << std::setw(3)
        content[0] = strStream.str();

        content[1].assign(versionInfo.uuidString, 0, Screen::SCREEN_WIDTH);
        content[2].assign(versionInfo.uuidString, Screen::SCREEN_WIDTH);
        content[3] = "firmware:" + versionInfo.firmwareVersionString;
    } else {
        resetStream();
        strStream << std::left << std::setw(14) << "updater:" << versionInfo.updaterVersionString << std::right << std::setw(2) << pageNum;// << std::setw(3)
        content[0] = strStream.str();

        content[1] = "driver:" + versionInfo.driverVersionString;
        content[2] = "kernel:" + versionInfo.kernelVersionString;
        content[3] = "filesystem:" + versionInfo.filesystemVersionString;

    }

    screen.show(&content[0], &content[1], &content[2], &content[3]);

}
